﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 学生管理
{
    public partial class FormSignup : Form
    {
        public FormSignup()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void Btn_signup_Click(object sender, EventArgs e)
        {
            if (Tb_username.Text == string.Empty || Tb_password.Text == string.Empty)
            {
                MessageBox.Show("信息不完整！", "提示",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Warning);
            }

            if (!Tb_username.Text.Equals("admin") || !Tb_password.Text.Equals("admin"))
            {
                MessageBox.Show("用户名或者密码错误！", "提示",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Warning);
            }
            else
            {
                
                Form form = new FormStudent();
                form.Show();this.Hide();
            }
        }

        private void Tb_username_MouseClick(object sender, MouseEventArgs e)
        {
            Tb_username.Text = string.Empty;
        }

        private void Tb_password_MouseClick(object sender, MouseEventArgs e)
        {
            Tb_password.Text = string.Empty;
        }

        private void Tb_username_TextChanged(object sender, EventArgs e)
        {

        }
    }
}
